package com.treasure.mall.biz.entity.user;

import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;

/**
 *
 * <p> 关注公众号用户
 * +---------------------------------------------------------
 * * @package: com.treasure.mall.biz.entity.user
 * * @author: guomw (guomwchen@foxmail.com)
 * * @date: 2020/8/26 8:35 下午
 * * @since: V1.0.0
 * +---------------------------------------------------------
 * 注意：本内容仅限于内部传阅，禁止外泄以及用于其他的商业目的
 * 
 */
@Entity
@Data
@Table(name = "zb_wechat_subscribe_user")
@NoArgsConstructor
@Cacheable(false)
public class WxSubscribeUser {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long id;

    /**
     * 关联用户
     */
    @Column(name = "user_id")
    private Long userId;

    /***
     * 公众号openid，发送模板消息时，使用该openId
     */
    @Column(name = "open_id", length = 50)
    private String openId;

    /**
     * unionId
     */
    @Column(name = "union_id", length = 50)
    private String unionId;

    /**
     * 是否关注
     */
    @Column(name = "is_subscribe")
    private boolean subscribe = true;

    @Column(name = "nick_name", length = 50)
    private String nickName;

    @Column(name = "mobile", length = 15)
    private String mobile;

}
